package com.sllp.C71S3TsllpShop.dao;

import com.sllp.C71S3TsllpShop.bean.OrdersItem;
import com.sllp.C71S3TsllpShop.bean.OrdersItemExample;
import com.sllp.C71S3TsllpShop.bean.Product;

import java.math.BigDecimal;
import java.util.List;
import org.apache.ibatis.annotations.Param;

public interface OrdersItemMapper {
    long countByExample(OrdersItemExample example);

    int deleteByExample(OrdersItemExample example);

    int deleteByPrimaryKey(String id);

    int insert(OrdersItem record);

    int insertSelective(OrdersItem record);

    List<OrdersItem> selectByExample(OrdersItemExample example);

    List<OrdersItem> selectByOrder(Integer orders);
    
    /**
     * 查询商家的订单（条件查询）
     * @param product
     * @param ordersItem
     * @return
     */
    List<OrdersItem> selectByBusiness(Product product,BigDecimal prePrice,BigDecimal nextPrice,OrdersItem ordersItem);
    
    OrdersItem selectByPrimaryKey(String id);

    int updateByExampleSelective(@Param("record") OrdersItem record, @Param("example") OrdersItemExample example);

    int updateByExample(@Param("record") OrdersItem record, @Param("example") OrdersItemExample example);

    int updateByPrimaryKeySelective(OrdersItem record);

    int updateByPrimaryKey(OrdersItem record);

}